<?php


namespace app\api\controller;


use app\api\logic\OrderRefundLogic;
use app\common\controller\BaseApiController;
use app\common\service\ConfigService;

/**
 * 售后
 * Class RefundController
 * @package app\api\controller
 */
class RefundController extends BaseApiController
{
    protected function init()
    {
        parent::init();
        $this->logic = new OrderRefundLogic();
//        $this->validate = new OrderValidate();
    }

    public function getConfig()
    {
        $config = ConfigService::getConfig('REFUND_CONFIG');
        $data['only_refund'] = explode("\n", $config['only_refund']);
        $data['goods_refund'] = explode("\n", $config['only_refund']);
        return $this->success($data);
    }

    public function apply()
    {

        $this->logic->apply(input());
        return $this->success();
    }
}